From 9fbe8ba6afc0c848bb359f610897f31b40f4dc97 Mon Sep 17 00:00:00 2001 From: Roan Kattouw Date: Thu, 25 Jun 2009 20:00:56 +0000 Subject: [PATCH] (bug 11270) Put the [edit] link after the section header instead of before, and don't right-float it anymore --- RELEASE-NOTES | 24 ++++++++++------- includes/DefaultSettings.php | 2 +- includes/Linker.php | 9 +++---- skins/MonoBook.php | 2 +- skins/Vector.php | 2 +- skins/chick/IE60Fixes.css | 1 - skins/chick/main.css | 38 +++++++++++++------------- skins/common/cologneblue.css | 3 +-- skins/common/common_rtl.css | 4 --- skins/common/oldshared.css | 22 --------------- skins/common/shared.css | 16 +++++++---- skins/common/wikistandard.css | 6 ----- skins/modern/rtl.css | 6 ----- skins/monobook/IE60Fixes.css | 1 - skins/monobook/IE70Fixes.css | 1 - skins/monobook/main.css | 30 +++++++++++---------- skins/monobook/rtl.css | 5 ---- skins/simple/main.css | 51 ++++++++++++----------------------- skins/simple/rtl.css | 5 ---- skins/vector/main.css | 47 ++++++++++++++------------------ 20 files changed, 107 insertions(+), 168 deletions(-) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 06fdbc1905..9c214d7974 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -81,14 +81,15 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN * (bug 14866) Messages 'recentchangeslinked-toolbox' and 'recentchangeslinked-toolbox' were added to allow more fine grained customisation of the user interface -* DISPLAYTITLE now accepts a limited amount of wiki markup (the single-quote items) +* DISPLAYTITLE now accepts a limited amount of wiki markup (the single-quote + items) * Special:Search now could search terms in all variant-forms. ONLY apply on wikis with LanguageConverter -* Add autopromote condition APCOND_BLOCKED to autopromote blocked users to various - user groups. -* Add $wgRevokePermissions as a means of restricting a group's rights. The syntax is - identical to $wgGroupPermissions, but users in these groups will have these rights - stripped from them. +* Add autopromote condition APCOND_BLOCKED to autopromote blocked users to + various user groups. +* Add $wgRevokePermissions as a means of restricting a group's rights. The + syntax is identical to $wgGroupPermissions, but users in these groups will + have these rights stripped from them. * Added a PHP port of CDB (constant database), for improved local caching when the DBA extension is not available. @@ -189,7 +190,8 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN * (bug 18925) history.js removes class names of list elements on initialization * Multiple whitespace in TOC anchors is now stripped, for consistency with the link from the edit comment -* (bug 19112) Preferences now respects $wgUseExternalEditor, $wgExternalDiffEngine +* (bug 19112) Preferences now respects $wgUseExternalEditor, + $wgExternalDiffEngine * (bug 18173) MediaWiki now fails when unable to determine a client IP * (bug 19170) Special:Version should follow the content language direction * (bug 19160) maintenance/purgeOldText.inc is now compatible with PostgreSQL @@ -199,8 +201,12 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN can add/remove *all* groups (have 'userrights' permission). * (bug 19294) Always show Sp-contributions-footer(-anon) * Attempts to restrict reading of pages while anonymous viewing is allowed - via extensions not using the userCan hook and via $wgRevokePermissions now work. -* (bug 8445) Multiple-character search terms are now handled properly for Chinese + via extensions not using the userCan hook and via $wgRevokePermissions now + work. +* (bug 8445) Multiple-character search terms are now handled properly for + Chinese +* (bug 11270) Put the section [edit] linker after the section header in the HTML + instead of before == API changes in 1.16 == diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php index 43962857b3..8988338155 100644 --- a/includes/DefaultSettings.php +++ b/includes/DefaultSettings.php @@ -1496,7 +1496,7 @@ $wgCacheEpoch = '20030516000000'; * to ensure that client-side caches do not keep obsolete copies of global * styles. */ -$wgStyleVersion = '228'; +$wgStyleVersion = '229'; # Server-side caching: diff --git a/includes/Linker.php b/includes/Linker.php index 48339e14a0..29ef95df65 100644 --- a/includes/Linker.php +++ b/includes/Linker.php @@ -1268,11 +1268,10 @@ class Linker { * @return string HTML headline */ public function makeHeadline( $level, $attribs, $anchor, $text, $link, $legacyAnchor = false ) { - $ret = "" - . "$text" - . ""; + $ret = "
" + . "" + . "" + . "$link
"; if ( $legacyAnchor !== false ) { $ret = "$ret"; } diff --git a/skins/MonoBook.php b/skins/MonoBook.php index cde87b966f..0c7607b015 100644 --- a/skins/MonoBook.php +++ b/skins/MonoBook.php @@ -114,7 +114,7 @@ class MonoBookTemplate extends QuickTemplate {
data['sitenotice']) { ?>
html('sitenotice') ?>
-

html('title') ?>

+

html('title') ?>

msg('tagline') ?>

html('subtitle') ?>
diff --git a/skins/Vector.php b/skins/Vector.php index 7f93e1f26c..7914bb1bc3 100644 --- a/skins/Vector.php +++ b/skins/Vector.php @@ -496,7 +496,7 @@ class VectorTemplate extends QuickTemplate { data['sitenotice']) { ?>
html('sitenotice') ?>
-

html('title') ?>

+

html('title') ?>

diff --git a/skins/chick/IE60Fixes.css b/skins/chick/IE60Fixes.css index feec15f166..a4c0a8f860 100644 --- a/skins/chick/IE60Fixes.css +++ b/skins/chick/IE60Fixes.css @@ -70,7 +70,6 @@ textarea { width: 96%; } -div.editsection, #catlinks, div.tright, div.tleft { diff --git a/skins/chick/main.css b/skins/chick/main.css index ef52a7962b..f017569275 100644 --- a/skins/chick/main.css +++ b/skins/chick/main.css @@ -41,33 +41,35 @@ hr { margin: 0.2em 0 0.2em 0; } -h1, h2, h3, h4, h5, h6 { - color: Black; - background: none; - font-weight: normal; - margin: 0; - padding-top: 0.5em; - padding-bottom: 0.17em; - border-bottom: 1px solid #aaaaaa; +/* Headers */ +.mw-h1, .mw-h2, .mw-h3, .mw-h4, .mw-h5, .mw-h6 { + color: black; + background: none; + margin: 0; + border-bottom: 1px solid #aaa; } -.editsection { +.mw-h3, .mw-h4, .mw-h5, .mw-h6 { + border-bottom: none; +} +h1, h2 { font-weight: normal; } h1 { font-size: 188%; } -h1 .editsection { font-size: 53.2%; } h2 { font-size: 150%; } -h2 .editsection { font-size: 66.7%; } -h3, h4, h5, h6 { - border-bottom: none; - font-weight: bold; -} h3 { font-size: 132%; } -h3 .editsection { font-size: 75.8%; } h4 { font-size: 116%; } -h4 .editsection { font-size: 86.2%; } h5 { font-size: 100%; } h6 { font-size: 80%; } -h6 .editsection { font-size: 125%; } + +/* To replicate the old padding, where h# were block-level elements and edit + * links were floated, we need to multiply .5em top padding and .17em bottom + * padding by the header text sizes. */ +.mw-h1 { padding: .94em 0 .32em; } /* (0.5*1.88)em 0 (0.17*1.88)em */ +.mw-h2 { padding: .75em 0 .26em; } /* (0.5*1.50)em 0 (0.17*1.50)em */ +.mw-h3 { padding: .66em 0 .22em; } /* etc. */ +.mw-h4 { padding: .58em 0 .20em; } +.mw-h5 { padding: .50em 0 .17em; } +.mw-h6 { padding: .40em 0 .14em; } ul { line-height: 1.5em; diff --git a/skins/common/cologneblue.css b/skins/common/cologneblue.css index 2329d233b4..461321d22a 100644 --- a/skins/common/cologneblue.css +++ b/skins/common/cologneblue.css @@ -83,7 +83,6 @@ h1 { font-family: Verdana, Arial, sans-serif; font-size: 180%; line-height: 21pt; } -h1 .editsection { font-size: 55.6%; } h1.pagetitle { padding-bottom: 0; margin-bottom: 0; } #article p.subtitle { color: #666666; font-size: 11pt; font-weight: bold; @@ -96,6 +95,6 @@ a:visited { color: #8D0749; } a.printable { text-decoration: underline; } a.stub, #quickbar a.stub { color:#772233; text-decoration:none; } a.new, #quickbar a.new { color: #CC2200; } -h2, h3, h4, h5, h6 { margin-bottom: 0; } +.mw-h2, .mw-h3, .mw-h4, .mw-h5, .mw-h6 { margin-bottom: 0; } small { font-size: 75%; } input.mw-searchInput { width: 106px; } diff --git a/skins/common/common_rtl.css b/skins/common/common_rtl.css index 4f075ae38f..2af02b80ea 100644 --- a/skins/common/common_rtl.css +++ b/skins/common/common_rtl.css @@ -18,10 +18,6 @@ fieldset.operaprefsection { margin-right: 1.4em; margin-left: 0.4em; } -.editsection { - float: left; - margin-right: 5px; -} div.tright, div.floatright { clear: none; } diff --git a/skins/common/oldshared.css b/skins/common/oldshared.css index 92c7d01f09..8d4dd34398 100644 --- a/skins/common/oldshared.css +++ b/skins/common/oldshared.css @@ -4,28 +4,6 @@ * CologneBlue, the old pre-Monobook skins */ -/* For clarity, explicitly state some recommendations from to make sure the editsection links scale right */ - -h1 { font-size: 2em; } -h2 { font-size: 1.5em; } -h3 { font-size: 1.17em; } -h5 { font-size: .83em; } -h6 { font-size: .75em; } -h1, h2, h3, h4, h5, h6 { font-weight: bolder } - -/* Now the custom parts */ - -/* Make edit sections (which are inside h# tags) normal-sized */ -.editsection { - font-weight: normal; -} -h1 .editsection { font-size: 50% } -h2 .editsection { font-size: 66.7% } -h3 .editsection { font-size: 85.5% } -h5 .editsection { font-size: 120% } -h6 .editsection { font-size: 133% } - #footer { clear: both } /* images */ div.floatright { float: right; clear: right; margin: 0 0 1em 1em; } diff --git a/skins/common/shared.css b/skins/common/shared.css index ba39c443b0..6f54af96ab 100644 --- a/skins/common/shared.css +++ b/skins/common/shared.css @@ -23,11 +23,17 @@ div#mw-js-message { background-color: #fcfcfc; } -/* Edit section links */ -.editsection { - float: right; - margin-left: 5px; -} +/* Display headings on the same line as edit link */ +h1, h2, h3, h4, h5, h6 { display: inline; margin: 0; } +/* But then we have to reintroduce the margin. We use the W3 recommended mar- + * gins , multiplying by the recom- + * mended font-size. */ +.mw-h1 { margin: 1.34em 0; } +.mw-h2 { margin: 1.13em 0; } +.mw-h3 { margin: 0.97em 0; } +.mw-h4 { margin: 1.12em 0; } +.mw-h5 { margin: 1.25em 0; } +.mw-h6 { margin: 1.25em 0; } /** * File histories diff --git a/skins/common/wikistandard.css b/skins/common/wikistandard.css index 5bf59246de..3642ee3bc2 100644 --- a/skins/common/wikistandard.css +++ b/skins/common/wikistandard.css @@ -27,18 +27,12 @@ textarea { overflow: auto; } h1.pagetitle { padding-top: 0; margin-top: 0; padding-bottom: 0; margin-bottom: 0; font-size:150%; } -h1.pagetitle .editsection { font-size: 66.7%; } h2 { font-size: 120%; } -h2 .editsection { font-size: 83.3%; } h2, h3, h4, h5, h6 { margin-bottom: 0;} h3 { font-size: 106.25%; } -h3 .editsection { font-size: 94.1%; } h4 { font-size: 103.125%; } -h4 .editsection { font-size: 97.0%; } h5 { font-size: 100%; } -h5 .editsection { font-size: 100%; } h6 { font-size: 95%; } -h6 .editsection { font-size: 105.3%; } hr.sep { color:gray;height:1px;background-color:gray;} p.subpages { font-size:small;} p.subtitle { padding-top: 0; margin-top: 0;} diff --git a/skins/modern/rtl.css b/skins/modern/rtl.css index f6cd0ebe63..72be0dca69 100644 --- a/skins/modern/rtl.css +++ b/skins/modern/rtl.css @@ -3,12 +3,6 @@ body { unicode-bidi: embed; } -.editsection { - float: left; - margin-right: 5px; - margin-left: 0; /* bug 9122: undo default LTR */ -} - /* Fix alignment */ .documentByLine, .portletDetails, diff --git a/skins/monobook/IE60Fixes.css b/skins/monobook/IE60Fixes.css index e6e447f6f5..146d4e8413 100644 --- a/skins/monobook/IE60Fixes.css +++ b/skins/monobook/IE60Fixes.css @@ -85,7 +85,6 @@ textarea { width: 96%; } -div.editsection, #catlinks, div.tright, div.tleft { diff --git a/skins/monobook/IE70Fixes.css b/skins/monobook/IE70Fixes.css index 00145860f8..5bb6ce9c9e 100644 --- a/skins/monobook/IE70Fixes.css +++ b/skins/monobook/IE70Fixes.css @@ -69,7 +69,6 @@ textarea { } /* -div.editsection, #catlinks, div.tright, div.tleft { diff --git a/skins/monobook/main.css b/skins/monobook/main.css index 54a22cb047..62b431028a 100644 --- a/skins/monobook/main.css +++ b/skins/monobook/main.css @@ -112,31 +112,33 @@ hr { margin: .2em 0 .2em 0; } -h1, h2, h3, h4, h5, h6 { +/* Headers */ +.mw-h1, .mw-h2, .mw-h3, .mw-h4, .mw-h5, .mw-h6 { color: black; background: none; - font-weight: normal; margin: 0; - padding-top: .5em; - padding-bottom: .17em; border-bottom: 1px solid #aaa; } -h1 { font-size: 188%; } -h1 .editsection { font-size: 53%; } -h2 { font-size: 150%; } -h2 .editsection { font-size: 67%; } -h3, h4, h5, h6 { +.mw-h3, .mw-h4, .mw-h5, .mw-h6 { border-bottom: none; - font-weight: bold; } +h1, h2 { font-weight: normal; } +h1 { font-size: 188%; } +h2 { font-size: 150%; } h3 { font-size: 132%; } -h3 .editsection { font-size: 76%; font-weight: normal; } h4 { font-size: 116%; } -h4 .editsection { font-size: 86%; font-weight: normal; } h5 { font-size: 100%; } -h5 .editsection { font-weight: normal; } h6 { font-size: 80%; } -h6 .editsection { font-size: 125%; font-weight: normal; } + +/* To replicate the old padding, where h# were block-level elements and edit + * links were floated, we need to multiply .5em top padding and .17em bottom + * padding by the header text sizes. */ +.mw-h1 { padding: .94em 0 .32em; } /* (0.5*1.88)em 0 (0.17*1.88)em */ +.mw-h2 { padding: .75em 0 .26em; } /* (0.5*1.50)em 0 (0.17*1.50)em */ +.mw-h3 { padding: .66em 0 .22em; } /* etc. */ +.mw-h4 { padding: .58em 0 .20em; } +.mw-h5 { padding: .50em 0 .17em; } +.mw-h6 { padding: .40em 0 .14em; } ul { line-height: 1.5em; diff --git a/skins/monobook/rtl.css b/skins/monobook/rtl.css index 59e994dc9a..0a16085fe4 100644 --- a/skins/monobook/rtl.css +++ b/skins/monobook/rtl.css @@ -40,11 +40,6 @@ html > body .portlet { float: right; clear: right; } -.editsection { - float: left; - margin-right: 5px; - margin-left: 0; /* bug 9122: undo default LTR */ -} /* recover IEMac (might be fine with the float, but usually it's close to IE */ *>body .portlet { float: none; diff --git a/skins/simple/main.css b/skins/simple/main.css index 5cf595098a..01fe0ba348 100644 --- a/skins/simple/main.css +++ b/skins/simple/main.css @@ -1,26 +1,3 @@ -/* For clarity, explicitly state some recommendations from to make sure the editsection links scale right */ - -h1 { font-size: 2em; } -h2 { font-size: 1.5em; } -h3 { font-size: 1.17em; } -h5 { font-size: .83em; } -h6 { font-size: .75em; } -h1, h2, h3, h4, h5, h6 { font-weight: bolder } - -/* Now the custom parts */ - -/* Make edit sections (which are inside h# tags) normal-sized */ -.editsection { - font-weight: normal; -} -h1 .editsection { font-size: 50% } -h2 .editsection { font-size: 66.7% } -h3 .editsection { font-size: 85.5% } -h5 .editsection { font-size: 120% } -h6 .editsection { font-size: 133% } - - #toolbar { display: none; } @@ -86,11 +63,22 @@ p { } p img { margin: 0; } -h1, h2, h3, h4, h5, h6 { - margin: 0; - padding-top: 0.5em; - padding-bottom: 0.17em; -} +.mw-h1, .mw-h2, .mw-h3, .mw-h4, .mw-h5, .mw-h6 { + margin: 0; +} +/* To replicate the old padding, where h# were block-level elements and edit + * links were floated, we need to multiply .5em top padding and .17em bottom + * padding by the header text sizes. We assume the W3 recommendations are + * used: 200%, 150%, 117%, 100%, 83%, 75% size in that order + * . If not the padding may be margin- + * ally off. */ +.mw-h1 { padding: .94em 0 .32em; } /* (0.5*1.88)em 0 (0.17*1.88)em */ +.mw-h2 { padding: .75em 0 .26em; } /* (0.5*1.50)em 0 (0.17*1.50)em */ +.mw-h3 { padding: .66em 0 .22em; } /* etc. */ +.mw-h4 { padding: .58em 0 .20em; } +.mw-h5 { padding: .50em 0 .17em; } +.mw-h6 { padding: .40em 0 .14em; } + fieldset { margin: 1em 0em 1em 0em; padding: 0em 1em 1em 1em; @@ -195,7 +183,7 @@ pre { border: solid 1px black; } -h1.firstHeading, h2 { +.firstHeading, .mw-h2 { border-bottom: solid 1px black; } #bodyContent a[href ^="http://"], @@ -383,10 +371,5 @@ table.collapsed tr.collapsable { display: none; } -.editsection { - float: right; - margin-left: 5px; -} - .templatesUsed { margin-top: 1.5em; } diff --git a/skins/simple/rtl.css b/skins/simple/rtl.css index a5a2b59f69..7c815b122b 100644 --- a/skins/simple/rtl.css +++ b/skins/simple/rtl.css @@ -40,11 +40,6 @@ html>body .portlet { float: right; clear: right; } -.editsection { - float: left; - margin-right: 5px; - margin-left: 0; /* bug 9122: undo default LTR */ -} /* recover IEMac (might be fine with the float, but usually it's close to IE */ *>body .portlet { float: none; diff --git a/skins/vector/main.css b/skins/vector/main.css index 6b06ba5ed8..9c0f769996 100644 --- a/skins/vector/main.css +++ b/skins/vector/main.css @@ -570,45 +570,38 @@ hr { } /* Structural Elements */ -h1, -h2, -h3, -h4, -h5, -h6 { +.mw-h1, +.mw-h2, +.mw-h3, +.mw-h4, +.mw-h5, +.mw-h6 { color: black; background: none; - font-weight: normal; margin: 0; - padding-top: .5em; - padding-bottom: .17em; border-bottom: 1px solid #aaa; width: auto; } -h1 { font-size: 188%; } -h1 .editsection { font-size: 53%; } -h2 { font-size: 150%; } -h2 .editsection { font-size: 67%; } -h3, -h4, -h5, -h6 { +.mw-h3, .mw-h4, .mw-h5, .mw-h6 { border-bottom: none; - font-weight: bold; } +h1, h2 { font-weight: normal; } +h1 { font-size: 188%; } +h2 { font-size: 150%; } h3 { font-size: 132%; } -h3 .editsection { font-size: 76%; font-weight: normal; } h4 { font-size: 116%; } -h4 .editsection { font-size: 86%; font-weight: normal; } h5 { font-size: 100%; } -h5 .editsection { font-weight: normal; } h6 { font-size: 80%; } -h6 .editsection { font-size: 125%; font-weight: normal; } -body.rtl .editsection { - float: left; - margin-right: 5px; - margin-left: 0; /* bug 9122: undo default LTR */ -} +/* To replicate the old padding, where h# were block-level elements and edit + * links were floated, we need to multiply .5em top padding and .17em bottom + * padding by the header text sizes. */ +.mw-h1 { padding: .94em 0 .32em; } /* (0.5*1.88)em 0 (0.17*1.88)em */ +.mw-h2 { padding: .75em 0 .26em; } /* (0.5*1.50)em 0 (0.17*1.50)em */ +.mw-h3 { padding: .66em 0 .22em; } /* etc. */ +.mw-h4 { padding: .58em 0 .20em; } +.mw-h5 { padding: .50em 0 .17em; } +.mw-h6 { padding: .40em 0 .14em; } + p { margin: .4em 0 .5em 0; line-height: 1.5em; -- 2.20.1